package cn.school.test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.school.dao.SubjectDao;
import cn.school.util.MyBatisUtil;
import cn.shcool.entity.Subject;

public class MyBatisTEst2 {

	public static void main(String[] args) {
		SqlSession s = MyBatisUtil.get();

		SubjectDao sdao = s.getMapper(SubjectDao.class);
		List<Subject> list = sdao.findALL();
		for (Subject sub : list)
			System.out.println(sub);

		MyBatisUtil.close(s);
	}

}
